$(document).ready(function () {
        var tmp_redar=[];
        var tmp_q;
        var data_redar=[];
        var mychat=echarts.init(document.getElementById('pie-2'));
        mychat.showLoading();
        $.ajax({
            url: "/data_text"
            , async: true
            , dataType: 'JSON'
            , timeout: 10000
            , contentType: "application/json"
            , success: function (data) {
                tmp_q=data[0].diagnosed+data[0].suspected+data[0].cured+data[0].died;
                tmp_redar.push(
                    {name:'确诊',max:data[0].diagnosed+data[0].diagnosed*0.2},
                    {name:'疑似',max:data[0].suspected+data[0].suspected*0.6},
                    {name:'治愈',max:data[0].cured+data[0].cured*0.8},
                    {name:'死亡',max:data[0].died+data[0].died}
                );
                data_redar=[data[0].diagnosed,data[0].suspected,data[0].cured,data[0].died];
                     var  option = {

    tooltip: {},
    legend: {
        data: ['今日数据']
    },
    radar: {
        // shape: 'circle',
        name: {
            textStyle: {
                color: '#fff',
                backgroundColor: '#999',
                borderRadius: 1,
                padding: [1, 3]
            }
        },
        indicator: tmp_redar
    },
    series: [{
        name: '全国数据',
        type: 'radar',
        // areaStyle: {normal: {}},
        data: [
            {
                value: data_redar,
                name: '全国疫情',
                symbol: 'circle',
                symbolSize: 8,
                itemStyle: {
                    normal: {
                        color: '',
                        lineStyle: {
                            color: '#5ac8fa',
                        },
                    },
                },

                label: {
                    normal: {
                        show: true,
                        formatter:data_redar
                    },
                },



            }
        ]
    }]
};
                $("#pie-1").append("<p id='pie-1-text'>整体数据(截止至"+data[0].date+")</p>");
                 $("#pie-1-text").css("margin-top","4px").css("margin-left","15px").css("color","#14c8d4");
               mychat.hideLoading();
                mychat.setOption(option);





               }

               })
    });

